﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GSLMS.Services.Interface;
using GSLMS.Entity;
using GSLMS.Entity.DTO;

namespace GSLMS.Services
{
    public class DictionaryService : IDictionary
    {
        private static readonly GSLMS.DAL.Oracle.SYS_Dict dal = new GSLMS.DAL.Oracle.SYS_Dict();
        public List<Dictionary> GetAll(int langType = 0)
        {
            return dal.GetAll(langType);
        }

        public List<Dictionary> GetByGroupName(string groupName, int langType = 0)
        {
            return dal.GetByGroupName(groupName, langType);
        }

        public List<Dictionary> GetAll(Dictionary searchparma)
        {
            return dal.GetAll(searchparma);
        }

        public Dictionary GetByID(string key, int langType = 0)
        {
            return dal.GetByID(key, langType);
        }

        public Dictionary GetByID(string groupname, string key, int langType = 0)
        {
            return dal.GetByID(groupname, key, langType);
        }


        public int Add(Dictionary model)
        {
            return dal.Add(model);
        }

        public int Update(Dictionary model)
        {
            return dal.Update(model);
        }

        public bool Delete(string key, string groupName)
        {
            return dal.Delete(key, groupName);
        }

        public bool DeleteGroupName(string groupName)
        {
            return dal.DeleteGroupName(groupName);
        }

        public bool IsExits(string groupName, string key)
        {
            bool isExit = false;
            return dal.IsExits(groupName, key);
            return isExit;
        }


    }
}
